package com.nuoniu.sibanyun;

import com.bstek.ureport.console.UReportServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import java.util.concurrent.FutureTask;

//@ImportResource("classpath:ureport.xml")
@SpringBootApplication
@EnableCaching
@EnableAsync
public class FrameworkApplication {

    @Bean
    public BCryptPasswordEncoder bCryptPasswordEncoder(){
        return new BCryptPasswordEncoder();
    }
    public static void main(String[] args) {
        SpringApplication.run(FrameworkApplication.class, args);
    }
//    @Bean
//    public ServletRegistrationBean buildUReportServlet() {
//        return new ServletRegistrationBean(new UReportServlet(), "/ureport/*");
//    }
}
